package e_锁机制;

/*
    测试类: 有三个窗口
 */
public class DemoTest {
    public static void main(String[] args) {
        //票对象
        TicketLock ticket = new TicketLock();

        //窗口1
        Thread t1 = new Thread(ticket,"窗口1");
        //窗口2
        Thread t2 = new Thread(ticket,"窗口2");
        //窗口3
        Thread t3 = new Thread(ticket,"窗口3");

        t1.start();
        t2.start();
        t3.start();
    }
}
